package donajurema.model;

public class Shop extends AbstractModelObject implements Comparable<Shop>
{
	private String	m_name;

	public Shop(String name)
	{
		this.setName(name);
	}

	public Shop()
	{
		this("");
	}

	/**
	 * @return The full name of the product.
	 */
	public String getName()
	{
		return this.m_name;
	}
	
	public void setName(String name)
	{
		String oldValue = m_name;
		this.m_name = name;
		firePropertyChange("name", oldValue, m_name);
	}

	@Override
	public String toString()
	{
		return m_name;
	}
	
	@Override
	public int compareTo(Shop anotherShop)
	{
		String s1 = this.m_name.toLowerCase();
		String s2 = anotherShop.m_name.toLowerCase();
	    return s1.compareTo(s2);
	}
}
